#!/bin/bash

function log_msg(){
  LOG_FILE="/var/log/`basename $0`.`hostname`.log"
  CONTENT="$1"
  TYPE="$2"

  echo "["`date +"%Y/%m/%d %H:%M:%S"`"]: ""$CONTENT" >> $LOG_FILE
  [ "$TYPE" == "2" ] && echo "$CONTENT"
  return 0
}

log_msg "Updating server time through NTP..." 2
/root/scripts/update/lz.ntp.update

log_msg "Updating Source Code through SVN..." 2
/root/scripts/update/lz.svn.update

log_msg "Updating WBEM MOF file online documents..." 2
/root/scripts/update/lz.mof.update

log_msg "Updating M11Y Source Code online documents..." 2
/root/scripts/update/lz.m11y.update

log_msg "DONE!!!" 2
